/**
 * 广寒宫
 * 网址:www.guanghangong.xyz
 */
package org.moon.framework.autoconfigure.scp;

import org.moon.framework.autoconfigure.scp.prop.ScpProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import ch.ethz.ssh2.SCPClient;

/**
 * scp自动注入
 * @author moon
 */
@Configuration
@ConditionalOnClass(SCPClient.class)
@EnableConfigurationProperties({ScpProperties.class})
public class ScpClientAutoConfiguration {
	
	@Bean(destroyMethod="clean")
	public ScpClient builderScpClient(ScpProperties scpProperties){
		return new ScpClient(scpProperties);
	}
}